﻿using System;
using System.Xml;
using BasecampRestAPI;
using NUnit.Framework;
using TestBasecampRestAPI.TestMoveToDoList;

namespace TestBasecampRestAPI
{
	[TestFixture]
	public class TestAccount
	{
		[Test]
		public void Construct()
		{
			FakeBaseCamp _camp;
			FakeRestWebService _service;
			_camp = FakeBaseCamp.GetInstance();
			_service = FakeRestWebService.GetInstance();
			_camp.ServiceGetFakeResult = _service;
			IAccount account = Account.GetInstance(_camp, TestBasecamp.GetElementForXml(Properties.Resources.FakeCategory));
			Assert.IsNotNull(account);
			Assert.AreEqual(1936, account.Id);
			Assert.AreEqual("Walter Bishop Inc.", account.Name);
			Assert.AreEqual(1, account.AccountHolderId);
			Assert.IsTrue(account.SSLEnabled);
			Assert.IsTrue(account.EmailNotificationEnabled);
			Assert.IsTrue(account.TimeTrackingEnabled);
			Assert.AreEqual(DateTime.Parse("2009-10-09T17:52:46Z"),
				account.
		}
	}
}
